<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../basePath.jsp"%>
<!DOCTYPE html>
  <html>

<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE">
	<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
	<title>商家入驻申请</title>
    <link rel="stylesheet" type="text/css" href="${basePath}statichcy/css/webbase.css" />
    <link rel="stylesheet" type="text/css" href="${basePath}statichcy/css/pages-register.css" />

	<script src="${basePath}vue/vue.js"></script>
	<script src="${basePath}vue/axios.min.js"></script>
</head>

<body>
	<div class="register py-container ">
		<!--head-->
		<div class="logoArea">
			<a href="" class="logo"></a>
		</div>
		<!--register-->
		<div class="registerArea">
			<h3>商家入驻申请<span class="go">我有账号，去<a href="${basePath}Hcy/toShoplogin" target="_blank">登陆</a></span></h3>
			<div class="info">
				<form class="sui-form form-horizontal" action="${basePath}Hcy/reg">



					<div class="control-group">
						<label class="control-label">登陆名（不可修改）：</label>
						<div class="controls">
							<input type="text"  id="sellerId" name="sellerId" placeholder="请输入由英文字母账号(5~10位)" value="" class="input-xfat input-xlarge" onblur="checkSellerId()">
								<span id="dui" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp;*账号不符合要求(请输入5~10位的英文字母)
								</span>
							    <span id="dui1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *账号已存在
							   </span>
						</div>
					</div>

					
					<div class="control-group">
						<label class="control-label">登陆密码：</label>
						<div class="controls">
							<input type="password" id="password" name="password"  placeholder="请输入首字母为英文大写(6~16位)" value="" class="input-xfat input-xlarge" onblur="checkPassword()">
								<span id="cuo" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *密码不符合要求
							   </span>
						</div>
					</div>

				
					<div class="control-group">
						<label class="control-label">店铺名称：</label>
						<div class="controls">
							<input id="nickName" name="nickName" type="text" placeholder="请输入您的店铺名称" class="input-xfat input-xlarge" onblur="checkNickName()">
							<span id="nickName1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *申请的店铺名称不能为空
							   </span>
						</div>
					</div>
				
					<div class="control-group">
						<label class="control-label">公司名称：</label>
						<div class="controls">
							<input id="name" name="name" type="text" placeholder="请输入您所属的公司名称" class="input-xfat input-xlarge" onblur="checkName()">
                            <span id="name1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *申请的公司名称不能为空
							   </span>
                        </div>
					</div>
					
					<div class="control-group">
						<label class="control-label">公司电话：</label>
						<div class="controls">
							<input id="telephone" name="telephone" type="text" placeholder="请输入正确的电话号码(5~11位)" class="input-xfat input-xlarge" onblur="checkTelephone()">
                            <span id="telephone1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *电话号码格式不正确
							   </span>
                        </div>
					</div>
					
					<div class="control-group">
						<label class="control-label">公司详细地址：</label>
						<div class="controls">
							<input id="addressDetail" name="addressDetail" type="text" placeholder="请输入您公司详细地址" class="input-xfat input-xlarge" onblur="checkAddressDetail()">
							<span id="addressDetail1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *公司地址不能为空
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">联系人姓名：</label>
						<div class="controls">
							<input id="linkmanName" name="linkmanName" type="text" placeholder="请输入联系人姓名" class="input-xfat input-xlarge" onblur="checkLinkmanName()">
							<span id="linkmanName1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *联系人姓名不能为空
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">联系人QQ：</label>
						<div class="controls">
							<input id="linkmanQq" name="linkmanQq" type="text" placeholder="请输入联系人QQ(5~10位)" class="input-xfat input-xlarge" onblur="checkLinkmanQq()">
							<span id="linkmanQq1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *联系人qq不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">联系人手机：</label>
						<div class="controls">
							<input id="linkmanMobile" name="linkmanMobile" type="text" placeholder="请输入联系人手机(11位)" value="" class="input-xfat input-xlarge" onblur="checkLinkmanMobile()">
							<span id="linkmanMobile1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *联系人手机不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">联系人EMAIL：</label>
						<div class="controls">
							<input id="linkmanEmail" name="linkmanEmail" type="text" placeholder="请输入联系人EMAIL" class="input-xfat input-xlarge" onblur="checkLinkmanEmail()">
							<span id="linkmanEmail1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *联系人EMAIL不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">营业执照号：</label>
						<div class="controls">
							<input id="licenseNumber" name="licenseNumber" type="text" placeholder="请输入营业执照号(只能为数字)" class="input-xfat input-xlarge" onblur="checkLicenseNumber()">
							<span id="licenseNumber1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *营业执照号不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">税务登记证号：</label>
						<div class="controls">
							<input id="taxNumber" name="taxNumber" type="text" placeholder="请输入税务登记证号(只能为数字)" class="input-xfat input-xlarge" onblur="checkTaxNumber()">
							<span id="taxNumber1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *税务登记证号不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">组织机构代码证：</label>
						<div class="controls">
							<input id="orgNumber" name="orgNumber" type="text" placeholder="请输入组织机构代码证(只能为数字)" class="input-xfat input-xlarge" onblur="checkOrgNumber()">
							<span id="orgNumber1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *组织机构代码证不能为空或格式不对
							   </span>
						</div>
					</div>
					
					<div class="control-group">
						<label class="control-label">法定代表人：</label>
						<div class="controls">
							<input id="legalPerson" name="legalPerson" type="text" placeholder="请输入法定代表人" class="input-xfat input-xlarge" onblur="checkLegalPerson()">
							<span id="legalPerson1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *法定代表人不能为空
							   </span>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label">法定代表人身份证号：</label>
						<div class="controls">
							<input id="legalPersonCardId" name="legalPersonCardId" type="text" placeholder="请输入法定代表人身份证号" class="input-xfat input-xlarge" onblur="checkLegalPersonCardId()">
							<span id="legalPersonCardId1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *法定代表人身份证号不能为空或格式不正确
							   </span>
						</div>
					</div>	

					<div class="control-group">
						<label class="control-label">开户行名称：</label>
						<div class="controls">
							<input id="bankUser" name="bankUser" type="text" placeholder="开户行名称" class="input-xfat input-xlarge" onblur="checkBankUser()">
							<span id="bankUser1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *开户行名称不能为空
							   </span>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label">开户行支行：</label>
						<div class="controls">
							<input id="bankName" name="bankName" type="text" placeholder="开户行支行" class="input-xfat input-xlarge" onblur="checkBankName()">
							<span id="bankName1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *开户行支行不能为空
							   </span>
						</div>
					</div>

					<div class="control-group">
						<label class="control-label">银行账号：</label>
						<div class="controls">
							<input id="bankAccount" name="bankAccount" type="text" placeholder="银行账号" class="input-xfat input-xlarge" onblur="checkBankAccount()">
							<span id="bankAccount1" style="display:none; color: red;" >
							 &nbsp;&nbsp;&nbsp; *银行账号不能为空或格式不对
							   </span>
						</div>
					</div>					
					
					<div class="control-group">
						<label for="inputPassword" class="control-label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
						<div class="controls">
							<input name="m1" type="checkbox" value="2" checked=""><span>同意协议并注册  <a href="sampling.html">《品优购商家入驻协议》</a></span>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label"></label>
						<div class="controls btn-reg">
							<input class="sui-btn btn-block btn-xlarge btn-danger" type="submit"  target="_blank">申请入驻</input>
						</div>
					</div>
				</form>
				<div class="clearfix"></div>
			</div>
		</div>
		<!--foot-->
		<div class="py-container copyright">
			<ul>
				<li>关于我们</li>
				<li>联系我们</li>
				<li>联系客服</li>
				<li>商家入驻</li>
				<li>营销中心</li>
				<li>手机品优购</li>
				<li>销售联盟</li>
				<li>品优购社区</li>
			</ul>
			<div class="address">地址：北京市昌平区建材城西路金燕龙办公楼一层 邮编：100096 电话：400-618-4000 传真：010-82935100</div>
			<div class="beian">京ICP备08001421号京公网安备110108007702
			</div>
		</div>
	</div>


<script type="text/javascript" src="${basePath}statichcy/js/plugins/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}statichcy/js/plugins/jquery.easing/jquery.easing.min.js"></script>
<script type="text/javascript" src="${basePath}statichcy/js/plugins/sui/sui.min.js"></script>
<script type="text/javascript" src="${basePath}statichcy/js/plugins/jquery-placeholder/jquery.placeholder.min.js"></script>
<script type="text/javascript" src="${basePath}statichcy/js/pages/register.js"></script>
</body>


  <script>
	  let regSellerId = /^[a-zA-Z]{5,10}$/;
	  let regPassword = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,16}$/;
	  let currency = /^[-a-zA-Z0-9_\u4e00-\u9fa5]{1,18}$/;
	  let currency2 = /^[0-9]{5,11}$/;
	  let currency3 = /^[0-9]{5,10}$/;

	  let currency4 = /^[1][3,4,5,7,8][0-9]{9}$/ //判断电话号码
	  let currency5 = /\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}$///判断邮箱
	  let currency6 = /^[0-9]{4,20}$/;

	  let currency7 = /\d{6}(19|20)\d{2}[01]\d[0123]\d{4}[\dxX]$///身份证
	  let currency8 = /^[0-9]{19}$/;
	  //登陆名
        function checkSellerId() {
         let  sellerId = document.getElementById("sellerId").value;
         let dui = document.getElementById("dui");
         let dui1 = document.getElementById("dui1");
         if (!regSellerId.test(sellerId)){
         	dui.style.display = "block";

		 }else {
         	dui.style.display = "none";
		 }
			$.get("${basePath}Hcy/checkSellerId?sellerId="+sellerId, function (data) {
				if (data) {
					dui1.style.display = "block";
				} else {
					dui1.style.display = "none";
				}
			})
		}


		//登陆密码
		function checkPassword() {
             	let password = document.getElementById("password").value;
                let cuo = document.getElementById("cuo");
                if (!regPassword.test(password)){
                	cuo.style.display = "block";
				}else {
                	cuo.style.display = "none";
				}
		}

		//商铺名称
	  function checkNickName() {
		  let nickName = document.getElementById("nickName").value;
		  let nickName1 = document.getElementById("nickName1");
		  if (!currency.test(nickName)){
			  nickName1.style.display = "block";
		  }else {
			  nickName1.style.display = "none";
		  }
	  }

	  //公司名称
      function checkName() {
          let name = document.getElementById("name").value;
          let name1 = document.getElementById("name1");
          if (!currency.test(name)){
              name1.style.display = "block";
          }else {
              name1.style.display = "none";
          }
      }

      //公司电话
      function checkTelephone() {
          let telephone = document.getElementById("telephone").value;
          let telephone1 = document.getElementById("telephone1");
          if (!currency2.test(telephone)){
              telephone1.style.display = "block";
          }else {
              telephone1.style.display = "none";
          }
      }


      //公司地址
	  function checkAddressDetail() {
		  let addressDetail1 = document.getElementById("addressDetail1");
		  if (document.getElementById("addressDetail").value == ""){
			  addressDetail1.style.display = "block";
		  }else {
			  addressDetail1.style.display = "none";
		  }
	  }

	  //联系人姓名
	  function checkLinkmanName() {
		  let linkmanName1 = document.getElementById("linkmanName1");
		  if (document.getElementById("linkmanName").value == ""){
			  linkmanName1.style.display = "block";
		  }else {
			  linkmanName1.style.display = "none";
		  }
	  }

	  //联系人qq   linkmanQq  checkLinkmanQq
	  function checkLinkmanQq() {
		  let linkmanQq = document.getElementById("linkmanQq").value;
		  let linkmanQq1 = document.getElementById("linkmanQq1");
		  if (!currency3.test(linkmanQq)){
			  linkmanQq1.style.display = "block";
		  }else {
			  linkmanQq1.style.display = "none";
		  }
	  }

	  //联系人电话  linkmanMobile  checkLinkmanMobile
	  function checkLinkmanMobile() {
		  let linkmanMobile = document.getElementById("linkmanMobile").value;
		  let linkmanMobile1 = document.getElementById("linkmanMobile1");
		  if (!currency4.test(linkmanMobile)){
			  linkmanMobile1.style.display = "block";
		  }else {
			  linkmanMobile1.style.display = "none";
		  }
	  }
	  //联系人EMAIL
	  function checkLinkmanEmail() {
		  let linkmanEmail = document.getElementById("linkmanEmail").value;
		  let linkmanEmail1 = document.getElementById("linkmanEmail1");
		  if (!currency5.test(linkmanEmail)){
			  linkmanEmail1.style.display = "block";
		  }else {
			  linkmanEmail1.style.display = "none";
		  }
	  }

	  //营业执照号
	  function checkLicenseNumber() {
		  let licenseNumber = document.getElementById("licenseNumber").value;
		  let licenseNumber1 = document.getElementById("licenseNumber1");
		  if (!currency6.test(licenseNumber)){
			  licenseNumber1.style.display = "block";
		  }else {
			  licenseNumber1.style.display = "none";
		  }
	  }

	  //税务登记证号taxNumber
	  function checkTaxNumber() {
		  let taxNumber = document.getElementById("taxNumber").value;
		  let taxNumber1 = document.getElementById("taxNumber1");
		  if (!currency6.test(taxNumber)){
			  taxNumber1.style.display = "block";
		  }else {
			  taxNumber1.style.display = "none";
		  }
	  }

//组织机构代码证
	  function checkOrgNumber() {
		  let orgNumber = document.getElementById("orgNumber").value;
		  let orgNumber1 = document.getElementById("orgNumber1");
		  if (!currency6.test(orgNumber)){
			  orgNumber1.style.display = "block";
		  }else {
			  orgNumber1.style.display = "none";
		  }
	  }

	  //法定代表人legalPerson
	  function checkLegalPerson() {
		  let legalPerson1 = document.getElementById("legalPerson1");
		  if (document.getElementById("legalPerson").value == ""){
			  legalPerson1.style.display = "block";
		  }else {
			  legalPerson1.style.display = "none";
		  }
	  }

	  //法定代表人身份证
	  function checkLegalPersonCardId() {
		  let legalPersonCardId = document.getElementById("legalPersonCardId").value;
		  let legalPersonCardId1 = document.getElementById("legalPersonCardId1");
		  if (!currency7.test(legalPersonCardId)){
			  legalPersonCardId1.style.display = "block";
		  }else {
			  legalPersonCardId1.style.display = "none";
		  }
	  }

	  //开户行名称bankUser
	  function checkBankUser() {
		  let bankUser1 = document.getElementById("bankUser1");
		  if (document.getElementById("bankUser").value == ""){
			  bankUser1.style.display = "block";
		  }else {
			  bankUser1.style.display = "none";
		  }
	  }

	  //开户行支行
	  function checkBankName() {
		  let bankName1 = document.getElementById("bankName1");
		  if (document.getElementById("bankName").value == ""){
			  bankName1.style.display = "block";
		  }else {
			  bankName1.style.display = "none";
		  }
	  }

	  //银行账号
	  function checkBankAccount() {
		  let bankAccount = document.getElementById("bankAccount").value;
		  let bankAccount1 = document.getElementById("bankAccount1");
		  if (!currency8.test(bankAccount)){
			  bankAccount1.style.display = "block";
		  }else {
			  bankAccount1.style.display = "none";
		  }
	  }
  </script>
</html>